#!/bin/sh

echo "*** Process for MYSQL/MARIADB service ***"

if [ -f /etc/rc.d/init.d/mysql ] ; then
	prog="mysql"
else
	prog="mysqld"
fi

if [ "$(/etc/rc.d/init.d/${prog} status|grep pid)" == "" ] ; then
	/etc/rc.d/init.d/${prog} start
fi
sleep 1

echo "  - Process: restart"
/etc/rc.d/init.d/${prog} stop
pkill -9 ${prog}
pkill -9 mysqld_safe
/etc/rc.d/init.d/${prog} start
